package com.wwt.springboot_vue.service.impl;

import com.wwt.springboot_vue.bean.User;
import com.wwt.springboot_vue.mapper.UserMapper;
import com.wwt.springboot_vue.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> findAll() {
        return userMapper.findAll();
    }

    @Override
    public List<User> findByStatus(String info) {
        return userMapper.findByStatus(info);
    }

    @Override
    public User findById(int user_id) {
        return userMapper.findById(user_id);
    }

    @Override
    public void delete(int user_id) {
        userMapper.delete(user_id);
    }

    @Override
    public void add(User user) {
        userMapper.add(user);
    }

    @Override
    public void update(User user) {
        userMapper.update(user);
    }

    @Override
    public List<User> findByLimit(int start, int size) {
        return userMapper.findByLimit(start, size);
    }

    @Override
    public List<User> findByStatusLimit(String info, int start, int size) {
        return userMapper.findByStatusLimit(info, start, size);
    }
}
